import http from "@/common/http/request";
import {
  musicSongBranchListInterface,
  musicSongBranchAddInterface,
  musicSongBranchUpdateInterface,
} from "./songBranch.interface";

// 伴奏支体列表
export const $musicSongBranchList = (data: musicSongBranchListInterface) => {
  const $http = new http();
  return $http.get({
    url: '/music/songBranch/list',
    data,
  })
}

// 伴奏支体详情
export const $musicSongBranchDetail = (id: number) => {
  const $http = new http();
  return $http.get({
    url: `/music/songBranch/${id}`,
  })
}

// 伴奏支体添加
export const $musicSongBranchAdd = (data: musicSongBranchAddInterface) => {
  const $http = new http();
  return $http.post({
    url: `/music/songBranch`,
    data,
  })
}

// 伴奏支体修改
export const $musicSongBranchUpdate = (data: musicSongBranchUpdateInterface) => {
  const $http = new http();
  return $http.put({
    url: `/music/songBranch`,
    data,
  })
}

// 伴奏支体删除
export const $musicSongBranchDelete = (ids: number[]) => {
  const $http = new http();
  return $http.delete({
    url: `/music/songBranch/${ids.join(',')}`,
  })
}